// 调查询问 api
import request from '@/utils/request'

// 查询调查询问列表
export function getInquiryList(data) {
  return request({
    url: '/ruoyi-system/surveyInquiry/list',
    method: 'get',
    params: data,
  })
}

// 查询详细
export function getInquiryDetail(id) {
  return request({
    url: '/ruoyi-system/surveyInquiry/' + id,
    method: 'get',
  })
}

// 删除
export function deleteInquiry(id) {
  return request({
    url: '/ruoyi-system/surveyInquiry/' + id,
    method: 'delete',
  })
}

// 保存
export function saveInquiry(data) {
  return request({
    url: '/ruoyi-system/surveyInquiry',
    method: 'post',
    data,
  })
}

// 修改
export function updateInquiry(data) {
  return request({
    url: '/ruoyi-system/surveyInquiry',
    method: 'put',
    data,
  })
}

// 预览
export function previewInquiry(params) {
  return request({
    url: '/ruoyi-system/surveyInquiry/preview',
    method: 'get',
    params,
  })
}

// 详情页预览
export function previewInquiryPdf(data) {
  return request({
    url: '/ruoyi-system/surveyInquiry/pdfPreview',
    method: 'post',
    data,
  })
}

// 上传附件
export function addFiles(data) {
  return request({
    url: '/ruoyi-system/surveyInquiry/addFiles',
    method: 'post',
    data,
  })
}

// 获取立案号下拉数据
export function getCaseList() {
  return request({
    url: '/ruoyi-system/surveyInquiry/caseList',
    method: 'get',
  })
}

// 根据立案号获取案件信息
export function getContent(params) {
  return request({
    url: '/ruoyi-system/surveyInquiry/getContent',
    method: 'get',
    params,
  })
}

// 导出
export function exportPenaltydecisions(data) {
  return request({
    url: '/ruoyi-system/surveyInquiry/export',
    method: 'post',
    data,
    responseType: 'blob',
  })
}
